/*
    管理chat页面的状态
*/

import { defineStore } from "pinia";

export const pageStore = defineStore({
    id:'ChatPage',
    state:() => {
        return {
            mode:"Chat",
            question:"",
            isThinking:false,
            isInterrupt:false,
        }
    },
    actions:{
        updateMode(newVal){
            this.mode = newVal
        },
        updateThinking(newVal){
            this.isThinking = newVal
        },
        updateQuestion(newVal){
            this.question = newVal
        }
    },
    getters:{
        getMode(){
            return this.mode
        },
    }
})